// 获取用商品
import axios from "../../utils/axios";

export function getList(query) {
    return axios({
        url: "goldendays-goods/agentProductGenerate/list",
        method: "get",
        params: query
    });
}
export function getAddList(query) {
    return axios({
        url: "goldendays-goods/busCommodityMain/list",
        method: "get",
        params: query
    });
}
//分类
export function getCategory() {
    return axios({
        url: "/agentProductGenerate/getCategoryCertification",
        method: "post",
    });
}

// 主营商品分类
export function getMainCategoryMap() {
    return axios({
        url: "goldendays-goods/busCommodityMain/getMainCommodityCategoryList",
        method: "get",
    });
}

//获取认证的分类0
export function getAuthenticationCategory() {
    return axios({
        url: "/agentProductGenerate/getAuthenticationCategory",
        method: "post",
    });
}
//获得仓库
export function getBusWarehouseList(query) {
    return axios({
        url: "/goldendays-goods/agentProductGenerate/getBusWarehouseList",
        method: "get",
        params: query
    });
}
// 删除
export function delBusCommodity(data) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/delBusCommodity",
        method: "post",
        data: data
    });
}

// 更新状态
export function updateBusCommodity(data) {
    return axios({
        url: "goldendays-goods/busCommodityMgr/updateBusCommodity",
        method: "post",
        data: data
    });
}
// 添加
export function addBusCommodity(data) {
    return axios({
        url: "goldendays-goods/agentProductGenerate/agentProductAdd", // agentProductGenerate/agentProductAdd
        method: "post",
        data: data
    });
}
// 添加品牌代理商商品
export function addBusCommodity1(data) {
    return axios({
        url: "goldendays-goods/busCommodityMain/updateVerifyBusCommodity", // agentProductGenerate/agentProductAdd
        method: "post",
        data: data
    });
}
// 添加品牌代理商商品
export function updateBusCommodityInventoryNum(data) {
    return axios({
        url: "goldendays-goods/agentProductGenerate/updateBusCommodityInventoryNum", // agentProductGenerate/agentProductAdd
        method: "post",
        data: data
    });
}
// 添加
// export function addBusCommodity(data) {
//     return axios({
//         url: "/busCommodityMgr/insertBusCommodity", // agentProductGenerate/agentProductAdd
//         method: "post",
//         data: data
//     });
// }

// 添加参数
export function insertCommodityInventory(data) {
    return axios({
        url: "/goldendays-goods/busCommodityMgr/insertCommodityInventory",
        method: "post",
        data: data
    });
}
/*------------评论----------*/
//列表
export function getComment(query) {
    return axios({
        url: "/goldendays-goods/busCommodityMgr/getComment",
        method: "get",
        params: query
    });
}
//h获得评价参数
export function getCommentParameters(query) {
    return axios({
        url: "/goldendays-goods/busCommodityMgr/getCommentParameters",
        method: "post",
        params: query
    });
}

// 删除
export function delComment(data) {
    return axios({
        url: "/goldendays-goods/busCommodityMgr/delComment",
        method: "post",
        data: data
    });
}

// 更新状态
export function updateBusCommodityComment(data) {
    return axios({
        url: "/goldendays-goods/busCommodityMgr/updateBusCommodityComment",
        method: "post",
        data: data
    });
}
// 添加
export function insertComment(data) {
    return axios({
        url: "/goldendays-goods/busCommodityMgr/insertComment",
        method: "post",
        data: data
    });
}

// /entityBusiness/getTemplateList 总后台商城商家管理--查询商城认证配置
// certification/getCertificationInfo 总后台商城商家管理--查询商城认证配置
export function getTemplateList(data) {
    return axios({
        url: "goldendays-goods/template/getTemplateByType",
        method: "post",
        data: data
    });
}
export function getGoodsCertificationInfo(data) {
    return axios({
        url: "goldendays-goods/template/getGoodsTemplate",
        method: "post",
        data: data
    });
}

// 主营商品列表,审核通过的，从这里面可以申请为品牌商品
export function getMainCommodityList(query) {
    return axios({
        url: "/busCommodityMain/list",
        method: "get",
        params: query
    });
}
// 添加品牌
export function addBrandCommodity(data) {
    return axios({
        url: "/busCommodityMain/updateVerifyBusCommodity",
        method: "post",
        data: data
    });
}
//查看驳回状态的详细信息 busCommodityMgr/queryCommodityAuditList
export function  checkAudit (query){
    return axios({
        url: "goldendays-goods/busCommodityMgr/queryCommodityAuditList",
        method: "post",
        params:query
    });
}
